package com.easypay.reactive8583.iso;

/**
 * @author pandans
 * @date 2021/03/04 16:12
 * @Description:
 */
public class MTI {
    private ISO8583Version iso8583Version;
    private MessageClass messageClass;
    private MessageFunction messageFunction;
    private MessageOrigin messageOrigin;

    public MTI(ISO8583Version iso8583Version, MessageClass messageClass, MessageFunction messageFunction, MessageOrigin messageOrigin) {
        this.iso8583Version = iso8583Version;
        this.messageClass = messageClass;
        this.messageFunction = messageFunction;
        this.messageOrigin = messageOrigin;
    }

    public int mtiValue(){
        return this.iso8583Version.getValue() +
                this.messageClass.getValue() +
                this.messageFunction.getValue() +
                this.messageOrigin.getValue();
    }
}
